/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.GUI.setting;

import ac.engin.setting.dbsetting;
import ac.settings.dataModel;
import ac.ui.controls.PCLFileCooser;
import ac.ui.controls.PCLPanel;
import ac.ui.controls.PCLTextField;
import ac.ui.utils;
import ac.uitls.propertiesOperation;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;

/**
 *
 * @author amrmo_sho
 */
public class DBInfo extends PCLPanel implements dataModel {

    /**
     * Creates new form DBInfo
     */
    ac.ui.custemItmes c = new ac.ui.custemItmes();
    ac.ui.utils u = new ac.ui.utils();
    propertiesOperation po = new propertiesOperation();

    dbsetting dbs = new dbsetting();

    public DBInfo() {
        initComponents();
        onLoad();
        monLoad();
    }
    ac.uitls.propertiesOperation op = new ac.uitls.propertiesOperation();

    private void monLoad() {

        String[] loadData = dbs.getSetting();

        jt_dbname.setText(loadData[1]);
        jt_password.setText(loadData[3]);
        jt_title.setText(loadData[0]);
        jt_username.setText(loadData[2]);

        jtab_data.setTitleAt(1, po.getWord("label.dbclear"));
        jtab_data.setTitleAt(0, po.getWord("label.dbinfo"));
        jtab_data.setTitleAt(2, po.getWord("label.DBBackUp"));

        pCLPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.copy")));
        pCLPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.restore")));
        jtxt_epath.setText("");
        jtxt_opath.setText("");
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar2 = new javax.swing.JToolBar();
        update_bt = new javax.swing.JButton();
        default_bt = new javax.swing.JButton();
        jtab_data = new ac.ui.controls.PCLTabs();
        pCLPanel1 = new ac.ui.controls.PCLPanel();
        jt_password = new javax.swing.JTextField();
        jt_title = new javax.swing.JTextField();
        jt_dbname = new javax.swing.JTextField();
        jt_username = new javax.swing.JTextField();
        pCLLabel2 = new ac.ui.controls.PCLLabel();
        pCLLabel3 = new ac.ui.controls.PCLLabel();
        pCLLabel1 = new ac.ui.controls.PCLLabel();
        pCLLabel4 = new ac.ui.controls.PCLLabel();
        pCLPanel2 = new ac.ui.controls.PCLPanel();
        jch_Balances = new ac.ui.controls.PCLCheckBox();
        pCLButton1 = new ac.ui.controls.PCLButton();
        jch_archives = new ac.ui.controls.PCLCheckBox();
        jch_treasurymovies = new ac.ui.controls.PCLCheckBox();
        jch_moves = new ac.ui.controls.PCLCheckBox();
        jch_adds = new ac.ui.controls.PCLCheckBox();
        pCLPanel3 = new ac.ui.controls.PCLPanel();
        pCLPanel4 = new ac.ui.controls.PCLPanel();
        jtxt_epath = new ac.ui.controls.PCLTextField();
        pCLButton2 = new ac.ui.controls.PCLButton();
        pCLLabel5 = new ac.ui.controls.PCLLabel();
        pCLPanel5 = new ac.ui.controls.PCLPanel();
        jtxt_opath = new ac.ui.controls.PCLTextField();
        pCLButton3 = new ac.ui.controls.PCLButton();
        pCLLabel6 = new ac.ui.controls.PCLLabel();

        jToolBar2.setRollover(true);

        update_bt.setText("bt_update");
        update_bt.setFocusable(false);
        update_bt.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        update_bt.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        update_bt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                update_btActionPerformed(evt);
            }
        });
        jToolBar2.add(update_bt);

        default_bt.setText("bt_default");
        default_bt.setFocusable(false);
        default_bt.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        default_bt.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        default_bt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                default_btActionPerformed(evt);
            }
        });
        jToolBar2.add(default_bt);

        jt_password.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jt_passwordKeyPressed(evt);
            }
        });

        jt_title.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jt_titleActionPerformed(evt);
            }
        });
        jt_title.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jt_titleKeyPressed(evt);
            }
        });

        jt_dbname.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jt_dbnameKeyPressed(evt);
            }
        });

        jt_username.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jt_usernameActionPerformed(evt);
            }
        });
        jt_username.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jt_usernameKeyPressed(evt);
            }
        });

        pCLLabel2.setText("lb_userName");

        pCLLabel3.setText("lb_password");

        pCLLabel1.setText("lb_Host");

        pCLLabel4.setText("lb_dbName");

        javax.swing.GroupLayout pCLPanel1Layout = new javax.swing.GroupLayout(pCLPanel1);
        pCLPanel1.setLayout(pCLPanel1Layout);
        pCLPanel1Layout.setHorizontalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pCLLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(28, 28, 28)
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jt_dbname)
                    .addComponent(jt_username, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
                    .addComponent(jt_password)
                    .addComponent(jt_title))
                .addContainerGap())
        );
        pCLPanel1Layout.setVerticalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jt_title, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jt_username, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jt_password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jt_dbname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pCLLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(176, Short.MAX_VALUE))
        );

        jtab_data.addTab("tab1", pCLPanel1);

        jch_Balances.setText("jlb_Balances");

        pCLButton1.setText("bt_update");
        pCLButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pCLButton1ActionPerformed(evt);
            }
        });

        jch_archives.setText("jlb_archives");

        jch_treasurymovies.setText("jlb_treasurymovies");

        jch_moves.setText("jlb_moves");

        jch_adds.setText("jlb_adds");

        javax.swing.GroupLayout pCLPanel2Layout = new javax.swing.GroupLayout(pCLPanel2);
        pCLPanel2.setLayout(pCLPanel2Layout);
        pCLPanel2Layout.setHorizontalGroup(
            pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel2Layout.createSequentialGroup()
                        .addComponent(pCLButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel2Layout.createSequentialGroup()
                        .addGroup(pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jch_adds, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(pCLPanel2Layout.createSequentialGroup()
                                .addGroup(pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jch_archives, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jch_Balances, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE))
                                .addGap(7, 7, 7)
                                .addGroup(pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jch_moves, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jch_treasurymovies, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE))))
                        .addGap(30, 30, 30))))
        );
        pCLPanel2Layout.setVerticalGroup(
            pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel2Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addGroup(pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jch_Balances, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jch_moves, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pCLPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jch_archives, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jch_treasurymovies, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jch_adds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25)
                .addComponent(pCLButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(141, Short.MAX_VALUE))
        );

        jtab_data.addTab("tab2", pCLPanel2);

        pCLPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("sssss"));

        jtxt_epath.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtxt_epathMouseClicked(evt);
            }
        });

        pCLButton2.setText("bt_update");
        pCLButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pCLButton2ActionPerformed(evt);
            }
        });

        pCLLabel5.setText("jlb_path");

        javax.swing.GroupLayout pCLPanel4Layout = new javax.swing.GroupLayout(pCLPanel4);
        pCLPanel4.setLayout(pCLPanel4Layout);
        pCLPanel4Layout.setHorizontalGroup(
            pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pCLButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 295, Short.MAX_VALUE)
                    .addComponent(jtxt_epath, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pCLPanel4Layout.setVerticalGroup(
            pCLPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel4Layout.createSequentialGroup()
                .addComponent(pCLLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jtxt_epath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pCLButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pCLPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("ssssss"));

        jtxt_opath.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtxt_opathMouseClicked(evt);
            }
        });

        pCLButton3.setText("bt_update");
        pCLButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pCLButton3ActionPerformed(evt);
            }
        });

        pCLLabel6.setText("jlb_path");

        javax.swing.GroupLayout pCLPanel5Layout = new javax.swing.GroupLayout(pCLPanel5);
        pCLPanel5.setLayout(pCLPanel5Layout);
        pCLPanel5Layout.setHorizontalGroup(
            pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pCLButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jtxt_opath, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pCLLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pCLPanel5Layout.setVerticalGroup(
            pCLPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel5Layout.createSequentialGroup()
                .addComponent(pCLLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 17, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtxt_opath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pCLButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pCLPanel3Layout = new javax.swing.GroupLayout(pCLPanel3);
        pCLPanel3.setLayout(pCLPanel3Layout);
        pCLPanel3Layout.setHorizontalGroup(
            pCLPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pCLPanel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        pCLPanel3Layout.setVerticalGroup(
            pCLPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCLPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pCLPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(31, 31, 31)
                .addComponent(pCLPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jtab_data.addTab("tab3", pCLPanel3);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jtab_data, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtab_data, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jt_titleKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jt_titleKeyPressed
        // TODO add your handling code here:
        //catchortCuts(evt);
    }//GEN-LAST:event_jt_titleKeyPressed

    private void jt_usernameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jt_usernameKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jt_usernameKeyPressed

    private void jt_passwordKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jt_passwordKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jt_passwordKeyPressed

    private void jt_dbnameKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jt_dbnameKeyPressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jt_dbnameKeyPressed

    private void update_btActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_update_btActionPerformed

        String[] items = {jt_title.getText(),
            jt_dbname.getText(),
            jt_username.getText(),
            jt_password.getText()};

        u.sendMessage(this, po.getWord("label.saveUpdate"), dbs.updateSetting(items));

    }//GEN-LAST:event_update_btActionPerformed

    private void default_btActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_default_btActionPerformed
        // TODO add your handling code here:
        //    UIU.sendMessage(this, po.getWord("label.saveUpdate"),gs.defSetting());
    }//GEN-LAST:event_default_btActionPerformed

    private void jt_usernameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jt_usernameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jt_usernameActionPerformed

    private void jt_titleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jt_titleActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jt_titleActionPerformed

    private void pCLButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pCLButton1ActionPerformed

        if (utils.sendClearDBMssage(this, "") == 0) {
            if (jch_Balances.isSelected()) {
                dbs.tabelClears(TABLES_Balances);

            }

            if (jch_adds.isSelected()) {
                dbs.tabelClears(TABLES_Adds, "type", "_reportes");

            }
            if (jch_archives.isSelected()) {
                dbs.tabelClears(TABLES_archives);

            }
            if (jch_moves.isSelected()) {
                dbs.tabelClears(TABLES_Moves);

            }
            if (jch_treasurymovies.isSelected()) {
                dbs.tabelClears(TABLES_treasuryMoves);

            }
        }
    }//GEN-LAST:event_pCLButton1ActionPerformed
    ac.lib.database.operations db = new ac.lib.database.operations();
    private void pCLButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pCLButton2ActionPerformed

        if (!jtxt_epath.getText().equalsIgnoreCase("")) {

            db.setExportDb(jtxt_epath.getText());
            jtxt_epath.setText("");
            jtxt_opath.setText("");
        }


    }//GEN-LAST:event_pCLButton2ActionPerformed

    private void pCLButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pCLButton3ActionPerformed
        if (!jtxt_opath.getText().equalsIgnoreCase("")) {

            db.setImportDb(jtxt_opath.getText());
            jtxt_epath.setText("");
            jtxt_opath.setText("");

        }
    }//GEN-LAST:event_pCLButton3ActionPerformed

    void openSavePath(PCLTextField p) {

        PCLFileCooser f = new PCLFileCooser();

        FileNameExtensionFilter File_ext_doc
                = new FileNameExtensionFilter("txt File", "txt");
        f.addChoosableFileFilter(File_ext_doc);

        if (f.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {

            String url = f.getSelectedFile().toPath().toString();
            p.setText(url + ".txt");

        }

    }

    void openPath(PCLTextField p) {

        PCLFileCooser f = new PCLFileCooser();

        FileNameExtensionFilter File_ext_doc
                = new FileNameExtensionFilter("txt File", "txt");
        f.addChoosableFileFilter(File_ext_doc);

        if (f.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {

            String url = f.getSelectedFile().toPath().toString();
            p.setText(url );

        }

    }

    private void jtxt_epathMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxt_epathMouseClicked
        openSavePath(jtxt_epath);


    }//GEN-LAST:event_jtxt_epathMouseClicked

    private void jtxt_opathMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtxt_opathMouseClicked
        // TODO add your handling code here:

        openPath(jtxt_opath);


    }//GEN-LAST:event_jtxt_opathMouseClicked


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton default_bt;
    private javax.swing.JToolBar jToolBar2;
    private ac.ui.controls.PCLCheckBox jch_Balances;
    private ac.ui.controls.PCLCheckBox jch_adds;
    private ac.ui.controls.PCLCheckBox jch_archives;
    private ac.ui.controls.PCLCheckBox jch_moves;
    private ac.ui.controls.PCLCheckBox jch_treasurymovies;
    private javax.swing.JTextField jt_dbname;
    private javax.swing.JTextField jt_password;
    private javax.swing.JTextField jt_title;
    private javax.swing.JTextField jt_username;
    private ac.ui.controls.PCLTabs jtab_data;
    private ac.ui.controls.PCLTextField jtxt_epath;
    private ac.ui.controls.PCLTextField jtxt_opath;
    private ac.ui.controls.PCLButton pCLButton1;
    private ac.ui.controls.PCLButton pCLButton2;
    private ac.ui.controls.PCLButton pCLButton3;
    private ac.ui.controls.PCLLabel pCLLabel1;
    private ac.ui.controls.PCLLabel pCLLabel2;
    private ac.ui.controls.PCLLabel pCLLabel3;
    private ac.ui.controls.PCLLabel pCLLabel4;
    private ac.ui.controls.PCLLabel pCLLabel5;
    private ac.ui.controls.PCLLabel pCLLabel6;
    private ac.ui.controls.PCLPanel pCLPanel1;
    private ac.ui.controls.PCLPanel pCLPanel2;
    private ac.ui.controls.PCLPanel pCLPanel3;
    private ac.ui.controls.PCLPanel pCLPanel4;
    private ac.ui.controls.PCLPanel pCLPanel5;
    private javax.swing.JButton update_bt;
    // End of variables declaration//GEN-END:variables
}
